﻿using System;
using System.Runtime.InteropServices;
using JTG.ServiceInterface.InterfaceService;
using JTG.ServiceInterface.Printer;
using zl9I_NewLisXML;

namespace JTG.ServiceInterface
{
    static class Program
    {
        [DllImport("winspool.drv")]
        public static extern bool SetDefaultPrinter(String Name); //调用win api将指定名称的打印机设置为默认打印机

        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            //读取CDATA中内容
            //var doc = new XmlDocument();
            //doc.LoadXml(File.ReadAllText("r.txt"));
            //var respXml = XmlHelper.DeSerializer<CheckInResponse.res>(doc.InnerText);

            //var respXml = XmlHelper.DeSerializer<CheckInResponse.Envelope>(File.ReadAllText("r.txt")).Body.HIPMessageServerResponse.payload.res;

            //new CheckInService().GetRegisterInfo("0087975", CheckInType.Card, new DateTime(2020, 6, 12), new DateTime(2020, 6, 13));
            //new CheckInService().CheckIn(new SignInfo()
            //{
            //    SignId = "261604",
            //    PatientId = "U0040777"
            //});


            //foreach (String fPrinterName in PrinterSettings.InstalledPrinters)
            //{
            //    SetDefaultPrinter(fPrinterName);
            //}

            //var lisReportQuery = new ZzzyyService().GetReportUrl("","");

            var isPrinterOnline = new Printer407().IsOnline("");

        }
    }
}